finding area under the curve finding by using rectangles